<template>
	<el-main class="bg edit_wrap">
		<el-form ref="form" :model="form" status-icon label-width="120px" v-if="is_view()">

							<el-col v-if="user_group === '管理员' || $check_field('get','meeting_number') || $check_field('add','meeting_number') || $check_field('set','meeting_number')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="会议编号" prop="meeting_number">
												<el-input id="meeting_number" v-model="form['meeting_number']" placeholder="请输入会议编号"
							  v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','meeting_number')) || (!form['meeting_information_id'] && $check_field('add','meeting_number'))" :disabled="disabledObj['meeting_number_isDisabled']"></el-input>
					<div v-else-if="$check_field('get','meeting_number')">{{form['meeting_number']}}</div>
											</el-form-item>
			</el-col>
								<el-col v-if="user_group === '管理员' || $check_field('get','conference_name') || $check_field('add','conference_name') || $check_field('set','conference_name')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="会议名称" prop="conference_name">
					<BilingualInput 
						v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','conference_name')) || (!form['meeting_information_id'] && $check_field('add','conference_name'))"
						v-model="form['conference_name']"
						field="conference_name"
						label="会议名称"
						input-type="input"
						:disabled="disabledObj['conference_name_isDisabled']"
					/>
					<div v-else-if="$check_field('get','conference_name')">{{$getBilingualText(form['conference_name'])}}</div>
				</el-form-item>
			</el-col>
								<el-col v-if="user_group === '管理员' || $check_field('get','meeting_type') || $check_field('add','meeting_type') || $check_field('set','meeting_type')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="会议类型" prop="meeting_type">
					<BilingualInput 
						v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','meeting_type')) || (!form['meeting_information_id'] && $check_field('add','meeting_type'))"
						v-model="form['meeting_type']"
						field="meeting_type"
						label="会议类型"
						input-type="input"
						:disabled="disabledObj['meeting_type_isDisabled']"
					/>
					<div v-else-if="$check_field('get','meeting_type')">{{$getBilingualText(form['meeting_type'])}}</div>
				</el-form-item>
			</el-col>
								<el-col v-if="user_group === '管理员' || $check_field('get','meeting_time') || $check_field('add','meeting_time') || $check_field('set','meeting_time')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="会议时间" prop="meeting_time">
												<el-date-picker
							  v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','meeting_time')) || (!form['meeting_information_id'] && $check_field('add','meeting_time'))"
							  v-model="form['meeting_time']"
							  type="datetime"
							  placeholder="选择会议时间"
							  format="yyyy-MM-dd HH:mm:ss"
							  value-format="timestamp"
							  :disabled="disabledObj['meeting_time_isDisabled']"
							  style="width: 100%;">
							</el-date-picker>
					<div v-else-if="$check_field('get','meeting_time')">{{formatMeetingTime(form['meeting_time'])}}</div>
											</el-form-item>
			</el-col>
								<el-col v-if="user_group === '管理员' || $check_field('get','meeting_venue') || $check_field('add','meeting_venue') || $check_field('set','meeting_venue')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="会议地点" prop="meeting_venue">
					<BilingualInput 
						v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','meeting_venue')) || (!form['meeting_information_id'] && $check_field('add','meeting_venue'))"
						v-model="form['meeting_venue']"
						field="meeting_venue"
						label="会议地点"
						input-type="input"
						:disabled="disabledObj['meeting_venue_isDisabled']"
					/>
					<div v-else-if="$check_field('get','meeting_venue')">{{$getBilingualText(form['meeting_venue'])}}</div>
				</el-form-item>
			</el-col>
								<el-col v-if="user_group === '管理员' || $check_field('get','amount_of_participation') || $check_field('add','amount_of_participation') || $check_field('set','amount_of_participation')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="参会金额" prop="amount_of_participation">
								<el-input-number id="amount_of_participation" v-model.number="form['amount_of_participation']"
						v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','amount_of_participation')) || (!form['meeting_information_id'] && $check_field('add','amount_of_participation'))" :disabled="disabledObj['amount_of_participation_isDisabled']"></el-input-number>
					<div v-else-if="$check_field('get','amount_of_participation')">{{form['amount_of_participation']}}</div>
							</el-form-item>
			</el-col>
			
			<!-- 新增：Poster价格 -->
			<el-col :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="Poster价格" prop="price_poster">
					<el-input-number id="price_poster" v-model.number="form['price_poster']" 
						placeholder="请输入Poster价格" :min="0" :step="100"></el-input-number>
				</el-form-item>
			</el-col>
			
			<!-- 新增：Oral价格 -->
			<el-col :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="Oral价格" prop="price_oral">
					<el-input-number id="price_oral" v-model.number="form['price_oral']" 
						placeholder="请输入Oral价格" :min="0" :step="100"></el-input-number>
				</el-form-item>
			</el-col>
			
			<!-- 新增：Listener价格 -->
			<el-col :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="Listener价格" prop="price_listener">
					<el-input-number id="price_listener" v-model.number="form['price_listener']" 
						placeholder="请输入Listener价格" :min="0" :step="100"></el-input-number>
				</el-form-item>
			</el-col>
			
								<el-col v-if="user_group === '管理员' || $check_field('get','site_equipment') || $check_field('add','site_equipment') || $check_field('set','site_equipment')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="场所设备" prop="site_equipment">
					<BilingualInput 
						v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','site_equipment')) || (!form['meeting_information_id'] && $check_field('add','site_equipment'))"
						v-model="form['site_equipment']"
						field="site_equipment"
						label="场所设备"
						input-type="textarea"
						:input-props="{rows: 4}"
						:disabled="disabledObj['site_equipment_isDisabled']"
					/>
					<div v-else-if="$check_field('get','site_equipment')">{{$getBilingualText(form['site_equipment'])}}</div>
				</el-form-item>
			</el-col>
								<el-col v-if="user_group === '管理员' || $check_field('get','meeting_cover') || $check_field('add','meeting_cover') || $check_field('set','meeting_cover')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
				<el-form-item label="会议封面" prop="meeting_cover">
								<el-upload :disabled="disabledObj['meeting_cover_isDisabled']" id="meeting_cover" class="avatar-uploader" drag
						accept="image/gif, image/jpeg, image/png, image/jpg" action="" :http-request="upload_meeting_cover"
						:show-file-list="false" v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','meeting_cover')) || (!form['meeting_information_id'] && $check_field('add','meeting_cover'))">
						<img v-if="form['meeting_cover']" :src="$fullUrl(form['meeting_cover'])" class="avatar">
						<i v-else class="el-icon-plus avatar-uploader-icon"></i>
					</el-upload>
					<el-image v-else-if="$check_field('get','meeting_cover')" style="width: 100px; height: 100px"
						:src="$fullUrl(form['meeting_cover'])" :preview-src-list="[$fullUrl(form['meeting_cover'])]">
						<div slot="error" class="image-slot">
							<img src="../../../public/img/error.png" style="width: 90px; height: 90px" />
						</div>
					</el-image>
							</el-form-item>
			</el-col>
								<el-col v-if="user_group === '管理员' || $check_field('get','conference_introduction') || $check_field('add','conference_introduction') || $check_field('set','conference_introduction')" :xs="24" :sm="24" :lg="24" class="el_form_editor_warp">
				<el-form-item label="会议简介" prop="conference_introduction">
					<BilingualInput 
						v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','conference_introduction')) || (!form['meeting_information_id'] && $check_field('add','conference_introduction'))"
						v-model="form['conference_introduction']"
						field="conference_introduction"
						label="会议简介"
						input-type="quill"
						:disabled="disabledObj['conference_introduction_isDisabled']"
					/>
					<div v-else-if="$check_field('get','conference_introduction')" v-html="$getBilingualText(form['conference_introduction'])"></div>
				</el-form-item>
			</el-col>

		<el-col v-if="user_group === '管理员' || $check_field('get','organizer_host') || $check_field('add','organizer_host') || $check_field('set','organizer_host')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
			<el-form-item label="主办单位" prop="organizer_host">
				<BilingualInput 
					v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','organizer_host')) || (!form['meeting_information_id'] && $check_field('add','organizer_host'))"
					v-model="form['organizer_host']"
					field="organizer_host"
					label="主办单位"
					input-type="textarea"
					:input-props="{rows: 3, placeholder: '多个单位用逗号分隔'}"
					:disabled="disabledObj['organizer_host_isDisabled']"
				/>
				<div v-else-if="$check_field('get','organizer_host')">{{$getBilingualText(form['organizer_host'])}}</div>
			</el-form-item>
		</el-col>

		<el-col v-if="user_group === '管理员' || $check_field('get','organizer_co') || $check_field('add','organizer_co') || $check_field('set','organizer_co')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
			<el-form-item label="协办单位" prop="organizer_co">
				<BilingualInput 
					v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','organizer_co')) || (!form['meeting_information_id'] && $check_field('add','organizer_co'))"
					v-model="form['organizer_co']"
					field="organizer_co"
					label="协办单位"
					input-type="textarea"
					:input-props="{rows: 3, placeholder: '多个单位用逗号分隔'}"
					:disabled="disabledObj['organizer_co_isDisabled']"
				/>
				<div v-else-if="$check_field('get','organizer_co')">{{$getBilingualText(form['organizer_co'])}}</div>
			</el-form-item>
		</el-col>

		<el-col v-if="user_group === '管理员' || $check_field('get','organizer_support') || $check_field('add','organizer_support') || $check_field('set','organizer_support')" :xs="24" :sm="12" :lg="8" class="el_form_item_warp">
			<el-form-item label="支持单位" prop="organizer_support">
				<BilingualInput 
					v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','organizer_support')) || (!form['meeting_information_id'] && $check_field('add','organizer_support'))"
					v-model="form['organizer_support']"
					field="organizer_support"
					label="支持单位"
					input-type="textarea"
					:input-props="{rows: 3, placeholder: '多个单位用逗号分隔'}"
					:disabled="disabledObj['organizer_support_isDisabled']"
				/>
				<div v-else-if="$check_field('get','organizer_support')">{{$getBilingualText(form['organizer_support'])}}</div>
			</el-form-item>
		</el-col>

			<!-- 主办单位Logo管理 -->
			<el-col :xs="24" :sm="24" :lg="24" class="el_form_item_warp" style="margin-top: 20px;">
				<el-form-item label="单位Logo管理">
					<el-alert
						title="提示：请先填写主办/协办/支持单位名称（用逗号分隔），然后为每个单位上传对应的Logo图片"
						type="info"
						:closable="false"
						style="margin-bottom: 15px;">
					</el-alert>
					
					<!-- 主办单位Logos -->
					<div class="logo_section" v-if="form.organizer_host">
						<h4 class="logo_section_title">主办单位Logo</h4>
						<div class="logo_items">
							<div class="logo_item" v-for="(name, index) in getUniqueOrganizerNames('host')" :key="'host-'+index">
								<div class="logo_preview">
									<img :src="$fullUrl(getOrganizerLogo('host', index))" alt="Logo">
								</div>
								<div class="logo_name">{{ name }}</div>
								<el-button type="danger" size="small" icon="el-icon-delete" circle @click="removeOrganizerLogo('host', index)"></el-button>
								<el-button type="primary" size="small" @click="openLogoUpload('host', index)">更换Logo</el-button>
							</div>
						</div>
					</div>
					
					<!-- 协办单位Logos -->
					<div class="logo_section" v-if="form.organizer_co">
						<h4 class="logo_section_title">协办单位Logo</h4>
						<div class="logo_items">
							<div class="logo_item" v-for="(name, index) in getUniqueOrganizerNames('co')" :key="'co-'+index">
								<div class="logo_preview">
									<img :src="$fullUrl(getOrganizerLogo('co', index))" alt="Logo">
								</div>
								<div class="logo_name">{{ name }}</div>
								<el-button type="danger" size="small" icon="el-icon-delete" circle @click="removeOrganizerLogo('co', index)"></el-button>
								<el-button type="primary" size="small" @click="openLogoUpload('co', index)">更换Logo</el-button>
							</div>
						</div>
					</div>
					
					<!-- 支持单位Logos -->
					<div class="logo_section" v-if="form.organizer_support">
						<h4 class="logo_section_title">支持单位Logo</h4>
						<div class="logo_items">
							<div class="logo_item" v-for="(name, index) in getUniqueOrganizerNames('support')" :key="'support-'+index">
								<div class="logo_preview">
									<img :src="$fullUrl(getOrganizerLogo('support', index))" alt="Logo">
								</div>
								<div class="logo_name">{{ name }}</div>
								<el-button type="danger" size="small" icon="el-icon-delete" circle @click="removeOrganizerLogo('support', index)"></el-button>
								<el-button type="primary" size="small" @click="openLogoUpload('support', index)">更换Logo</el-button>
							</div>
						</div>
					</div>
					
					<!-- Logo上传对话框 -->
					<el-dialog title="上传Logo" :visible.sync="showOrganizerLogoUpload" width="400px">
						<el-upload
							class="logo-uploader"
							drag
							accept="image/gif, image/jpeg, image/png, image/jpg"
							action=""
							:http-request="uploadOrganizerLogo"
							:show-file-list="false">
							<i class="el-icon-upload"></i>
							<div class="el-upload__text">将Logo拖到此处，或<em>点击上传</em></div>
						</el-upload>
					</el-dialog>
				</el-form-item>
			</el-col>

		<el-col v-if="user_group === '管理员' || $check_field('get','accommodation_description') || $check_field('add','accommodation_description') || $check_field('set','accommodation_description')" :xs="24" :sm="24" :lg="24" class="el_form_item_warp">
			<el-form-item label="住宿描述" prop="accommodation_description">
				<BilingualInput 
					v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','accommodation_description')) || (!form['meeting_information_id'] && $check_field('add','accommodation_description'))"
					v-model="form['accommodation_description']"
					field="accommodation_description"
					label="住宿描述"
					input-type="textarea"
					:input-props="{ rows: 4 }"
					:disabled="disabledObj['accommodation_description_isDisabled']"
				/>
				<div v-else-if="$check_field('get','accommodation_description')">{{$getBilingualText(form['accommodation_description'])}}</div>
			</el-form-item>
		</el-col>

		<el-col v-if="user_group === '管理员' || $check_field('get','accommodation_images') || $check_field('add','accommodation_images') || $check_field('set','accommodation_images')" :xs="24" :sm="24" :lg="24" class="el_form_item_warp">
			<el-form-item label="住宿图片" prop="accommodation_images">
				<div v-if="user_group === '管理员' || (form['meeting_information_id'] && $check_field('set','accommodation_images')) || (!form['meeting_information_id'] && $check_field('add','accommodation_images'))">
					<!-- 图片列表 -->
					<div class="accommodation_images_list">
						<div class="image_item" v-for="(image, index) in accommodationImagesList" :key="index">
							<div class="image_preview">
								<img :src="$fullUrl(image.url)" :alt="image.caption" style="width: 100px; height: 100px; object-fit: cover;">
							</div>
							<div class="image_info">
								<el-input v-model="image.url" placeholder="图片路径" style="margin-bottom: 5px;"></el-input>
								<el-input v-model="image.caption" placeholder="图片说明"></el-input>
							</div>
							<el-button type="danger" icon="el-icon-delete" circle @click="removeAccommodationImage(index)"></el-button>
						</div>
					</div>
					<!-- 添加新图片 -->
					<el-button type="primary" icon="el-icon-plus" @click="addAccommodationImage">添加住宿图片</el-button>
					<el-button type="text" @click="showAccommodationImageUpload = true">或上传图片</el-button>
					
					<!-- 上传对话框 -->
					<el-dialog title="上传住宿图片" :visible.sync="showAccommodationImageUpload" width="400px">
						<el-upload
							class="image-uploader"
							drag
							accept="image/gif, image/jpeg, image/png, image/jpg"
							action=""
							:http-request="uploadAccommodationImage"
							:show-file-list="false">
							<i class="el-icon-upload"></i>
							<div class="el-upload__text">将图片拖到此处，或<em>点击上传</em></div>
						</el-upload>
						<el-input v-model="newImageCaption" placeholder="请输入图片说明" style="margin-top: 10px;"></el-input>
					</el-dialog>
				</div>
				<div v-else-if="$check_field('get','accommodation_images')">
					<div class="image_item" v-for="(image, index) in accommodationImagesList" :key="index" style="display: inline-block; margin: 5px;">
						<img :src="$fullUrl(image.url)" :alt="image.caption" style="width: 100px; height: 100px; object-fit: cover;">
						<p>{{ image.caption }}</p>
					</div>
				</div>
			</el-form-item>
		</el-col>

			<el-col :xs="24" :sm="12" :lg="8" class="el_form_btn_warp">
				<el-form-item>
					<el-button type="primary" @click="submit()">提交</el-button>
					<el-button @click="cancel()">取消</el-button>
				</el-form-item>
			</el-col>

		</el-form>
	</el-main>
</template>

<script>
	import mixin from "@/mixins/page.js";

	export default {
		mixins: [mixin],
		data() {
			return {
				field: "meeting_information_id",
				url_add: "~/api/meeting_information/add?",
				url_set: "~/api/meeting_information/set?",
				url_get_obj: "~/api/meeting_information/get_obj?",
				url_upload: "~/api/meeting_information/upload?",

				query: {
					"meeting_information_id": 0,
				},

				form: {
						"meeting_number":  '', // 会议编号
								"conference_name":  '', // 会议名称
								"meeting_type":  '', // 会议类型
								"meeting_time":  '', // 会议时间
								"meeting_venue":  '', // 会议地点
								"amount_of_participation":  0, // 参会金额
								"price_poster":  0, // Poster价格
								"price_oral":  0, // Oral价格
								"price_listener":  0, // Listener价格
								"site_equipment":  '', // 场所设备
								"meeting_cover":  '', // 会议封面
								"conference_introduction":  '', // 会议简介
						"organizer_host":  '', // 主办单位
						"organizer_co":  '', // 协办单位
						"organizer_support":  '', // 支持单位
						"organizer_logos":  '', // 主办单位Logo
						"accommodation_images":  '', // 住宿图片
						"accommodation_description":  '', // 住宿描述
									"meeting_information_id": 0, // ID
				
			},
			// 住宿图片管理
			accommodationImagesList: [],
			showAccommodationImageUpload: false,
			newImageCaption: '',
			uploadingImageUrl: '',
			// 主办单位Logo管理 - 新格式：{"zh":[{"name":"单位名","logo":"路径"}],"eh":[{"name":"单位名","logo":"路径"}]}
			organizerLogos: {
				host: { zh: [], eh: [] },
				co: { zh: [], eh: [] },
				support: { zh: [], eh: [] }
			},
			showOrganizerLogoUpload: false,
			uploadingOrganizerType: '',
				disabledObj:{
							"meeting_number_isDisabled": false,
									"conference_name_isDisabled": false,
									"meeting_type_isDisabled": false,
									"meeting_time_isDisabled": false,
									"meeting_venue_isDisabled": false,
				          			"amount_of_participation_isDisabled": false,
									"site_equipment_isDisabled": false,
									"meeting_cover_isDisabled": false,
									"conference_introduction_isDisabled": false,
									"organizer_host_isDisabled": false,
									"organizer_co_isDisabled": false,
									"organizer_support_isDisabled": false,
									"accommodation_images_isDisabled": false,
									"accommodation_description_isDisabled": false,
									},

	
		
		
		
		
		
		
		
		
	
			}
		},
		methods: {


	
	
			
	
			
	
			
	
			
	
			
	
			
	
		
		/**
		 * 上传会议封面
		 * @param {Object} param 图片参数
		 */
		upload_meeting_cover(param){
					this.uploadFile(param.file, "meeting_cover");
				},
		
		// 住宿图片管理方法
		parseAccommodationImagesFromString(str) {
			if (!str) {
				this.accommodationImagesList = [];
				return;
			}
			try {
				this.accommodationImagesList = JSON.parse(str);
			} catch (e) {
				this.accommodationImagesList = [];
			}
		},
		updateAccommodationImagesString() {
			this.form.accommodation_images = JSON.stringify(this.accommodationImagesList);
		},
		addAccommodationImage() {
			this.accommodationImagesList.push({
				url: '',
				caption: ''
			});
			this.updateAccommodationImagesString();
		},
		removeAccommodationImage(index) {
			this.accommodationImagesList.splice(index, 1);
			this.updateAccommodationImagesString();
		},
		async uploadAccommodationImage(param) {
			// 使用FormData上传
			const formData = new FormData();
			formData.append('file', param.file);
			
			try {
				const json = await this.$post(this.url_upload, formData);
				if (json.result && json.result.url) {
					this.accommodationImagesList.push({
						url: json.result.url,
						caption: this.newImageCaption || '住宿图片'
					});
					this.updateAccommodationImagesString();
					this.showAccommodationImageUpload = false;
					this.newImageCaption = '';
					this.$message.success('图片上传成功');
				} else {
					this.$message.error('图片上传失败');
				}
			} catch (error) {
				console.error('上传失败：', error);
				this.$message.error('图片上传失败: ' + (error.message || '未知错误'));
			}
		},
		
		// 主办单位Logo管理方法
		parseOrganizerLogosFromString(str) {
			if (!str) {
				this.organizerLogos = {
					host: { zh: [], eh: [] },
					co: { zh: [], eh: [] },
					support: { zh: [], eh: [] }
				};
				return;
			}
			try {
				const parsed = JSON.parse(str);
				// 兼容旧格式：{"host":[], "co":[], "support":[]}
				if (parsed.host && Array.isArray(parsed.host)) {
					// 旧格式，转换为新格式
					this.organizerLogos = {
						host: { zh: [], eh: [] },
						co: { zh: [], eh: [] },
						support: { zh: [], eh: [] }
					};
					// 迁移旧数据（只迁移到zh）
					if (parsed.host) {
						this.organizerLogos.host.zh = parsed.host.map((logo, idx) => ({
							name: this.getOrganizerName('host', idx),
							logo: logo || '/img/default.png'
						}));
					}
					if (parsed.co) {
						this.organizerLogos.co.zh = parsed.co.map((logo, idx) => ({
							name: this.getOrganizerName('co', idx),
							logo: logo || '/img/default.png'
						}));
					}
					if (parsed.support) {
						this.organizerLogos.support.zh = parsed.support.map((logo, idx) => ({
							name: this.getOrganizerName('support', idx),
							logo: logo || '/img/default.png'
						}));
					}
				} else {
					// 新格式：{"host":{"zh":[...],"eh":[...]}, ...}
					this.organizerLogos = parsed;
					// 确保结构完整
					if (!this.organizerLogos.host) this.organizerLogos.host = { zh: [], eh: [] };
					if (!this.organizerLogos.host.zh) this.organizerLogos.host.zh = [];
					if (!this.organizerLogos.host.eh) this.organizerLogos.host.eh = [];
					if (!this.organizerLogos.co) this.organizerLogos.co = { zh: [], eh: [] };
					if (!this.organizerLogos.co.zh) this.organizerLogos.co.zh = [];
					if (!this.organizerLogos.co.eh) this.organizerLogos.co.eh = [];
					if (!this.organizerLogos.support) this.organizerLogos.support = { zh: [], eh: [] };
					if (!this.organizerLogos.support.zh) this.organizerLogos.support.zh = [];
					if (!this.organizerLogos.support.eh) this.organizerLogos.support.eh = [];
				}
			} catch (e) {
				this.organizerLogos = {
					host: { zh: [], eh: [] },
					co: { zh: [], eh: [] },
					support: { zh: [], eh: [] }
				};
			}
		},
		updateOrganizerLogosString() {
			this.form.organizer_logos = JSON.stringify(this.organizerLogos);
		},
		/**
		 * 解析单位名称，提取中文部分，并去重（同一单位的中英文只算一个）
		 * 只返回中文名称，忽略纯英文名称
		 * @param {String} namesStr 单位名称字符串，用逗号分隔
		 * @return {Array} 解析后的单位名称数组（只包含中文）
		 */
		parseOrganizerNames(namesStr) {
			if (!namesStr) return [];
			
			const names = namesStr.split(',').map(s => {
				let trimmed = s.trim();
				if (!trimmed) return null;
				
				// 清理首尾多余的引号
				trimmed = trimmed.replace(/^["']+|["']+$/g, '');
				
				// 优先使用正则表达式提取中文内容（即使JSON不完整也能处理）
				// 匹配模式：{"zh":"中文内容" 或 "zh":"中文内容" 或 {"zh":"中文内容（不完整）
				const zhPatterns = [
					/\{"zh"\s*:\s*"([^"]+)"/,           // {"zh":"中文"
					/\{"zh"\s*:\s*'([^']+)'/,          // {"zh":'中文'
					/"zh"\s*:\s*"([^"]+)"/,            // "zh":"中文"
					/'zh'\s*:\s*"([^"]+)"/,            // 'zh':"中文"
					/zh\s*:\s*"([^"]+)"/,              // zh:"中文"
					/zh\s*:\s*'([^']+)'/,              // zh:'中文'
					/\{["']?zh["']?\s*:\s*["']([^"']+)["']?/,  // {zh:"中文" 或 {zh:'中文'
				];
				
				for (const pattern of zhPatterns) {
					const match = trimmed.match(pattern);
					if (match && match[1]) {
						const zhName = match[1].trim();
						// 确保提取的内容包含中文
						if (/[\u4e00-\u9fa5]/.test(zhName)) {
							return zhName;
						}
					}
				}
				
				// 如果正则匹配失败，尝试解析JSON
				try {
					if (trimmed.startsWith('{')) {
						// 如果JSON不完整（缺少闭合}），尝试修复
						let jsonStr = trimmed;
						if (!jsonStr.endsWith('}')) {
							// 尝试找到最后一个引号，然后添加闭合
							const lastQuoteIndex = jsonStr.lastIndexOf('"');
							if (lastQuoteIndex > 0) {
								jsonStr = jsonStr.substring(0, lastQuoteIndex + 1) + '}';
							} else {
								jsonStr = jsonStr + '}';
							}
						}
						
						const parsed = JSON.parse(jsonStr);
						if (parsed && typeof parsed === 'object') {
							// 如果是JSON对象，优先返回中文部分
							if (parsed.zh) {
								return String(parsed.zh).trim();
							}
							// 如果没有中文，但有英文，跳过（不返回英文）
							if (parsed.en && !parsed.zh) {
								return null; // 跳过纯英文名称
							}
						}
					}
				} catch (e) {
					// JSON解析失败，继续处理为普通文本
				}
				
				// 处理普通文本：检查是否包含中文
				const hasChinese = /[\u4e00-\u9fa5]/.test(trimmed);
				if (hasChinese) {
					// 如果包含不完整的JSON片段，尝试清理
					// 移除开头的 {"zh": 或 "zh": 等模式
					let cleaned = trimmed
						.replace(/^\{?\s*["']?zh["']?\s*:\s*["']?/i, '')
						.replace(/^\{[^}]*zh\s*:\s*["']?/i, '')
						.replace(/["']?\s*\}?.*$/i, '')
						.replace(/["']+$/g, '')
						.replace(/^["']+/g, '');
					
					// 如果清理后还有中文，返回清理后的文本
					if (/[\u4e00-\u9fa5]/.test(cleaned)) {
						return cleaned.trim();
					}
					
					// 如果清理后没有中文了，尝试直接从原始文本中提取中文部分
					// 提取所有中文字符
					const chineseMatch = trimmed.match(/[\u4e00-\u9fa5]+/g);
					if (chineseMatch && chineseMatch.length > 0) {
						return chineseMatch.join('');
					}
					
					// 如果都失败了，返回原始文本（至少包含中文）
					return trimmed.trim();
				}
				
				// 如果没有中文字符，可能是纯英文，跳过
				return null;
			}).filter(s => s !== null && s !== '');
			
			// 去重：使用Set确保同一单位只出现一次
			const uniqueNames = [];
			const seen = new Set();
			for (const name of names) {
				const cleanedName = name.trim();
				if (cleanedName && !seen.has(cleanedName)) {
					seen.add(cleanedName);
					uniqueNames.push(cleanedName);
				}
			}
			
			return uniqueNames;
		},
		/**
		 * 获取单位名称的原始JSON字符串（用于匹配中英文）
		 * @param {String} namesStr 单位名称字符串，用逗号分隔
		 * @param {Number} index 单位索引
		 * @return {String} 原始单位名称（可能是JSON字符串）
		 */
		getOriginalOrganizerName(namesStr, index) {
			if (!namesStr) return null;
			const names = namesStr.split(',').map(s => s.trim()).filter(s => s);
			return names[index] || null;
		},
		/**
		 * 同步eh数组（根据单位名称的双语JSON，在eh数组中存储对应的英文名称和logo路径）
		 * @param {String} type 单位类型：'host', 'co', 'support'
		 * @param {String} namesStr 单位名称字符串，用逗号分隔
		 */
		syncOrganizerLogosEh(type, namesStr) {
			if (!namesStr) return;
			
			// 确保eh数组存在
			if (!this.organizerLogos[type].eh) {
				this.organizerLogos[type].eh = [];
			}
			
			const originalNames = namesStr.split(',').map(s => s.trim()).filter(s => s);
			
			// 遍历所有单位名称
			for (const originalName of originalNames) {
				try {
					const parsed = JSON.parse(originalName);
					if (parsed && typeof parsed === 'object' && parsed.zh && parsed.en) {
						// 如果是双语JSON对象，在eh数组中存储英文名称和对应的logo路径
						const zhItem = this.organizerLogos[type].zh.find(item => item.name === parsed.zh);
						if (zhItem) {
							// 查找或创建eh数组中的条目
							let ehItem = this.organizerLogos[type].eh.find(item => item.name === parsed.en);
							if (ehItem) {
								// 更新现有条目，使用相同的logo路径
								ehItem.logo = zhItem.logo;
							} else {
								// 创建新条目，使用相同的logo路径
								ehItem = { name: parsed.en, logo: zhItem.logo };
								this.organizerLogos[type].eh.push(ehItem);
							}
						}
					}
				} catch (e) {
					// 不是JSON格式，跳过
				}
			}
		},
		getOrganizerName(type, index) {
			let fieldName = '';
			if (type === 'host') fieldName = 'organizer_host';
			else if (type === 'co') fieldName = 'organizer_co';
			else if (type === 'support') fieldName = 'organizer_support';
			
			if (!this.form[fieldName]) return `单位 ${index + 1}`;
			
			// 使用解析方法获取去重后的单位名称列表
			const parsedNames = this.parseOrganizerNames(this.form[fieldName]);
			return parsedNames[index] || `单位 ${index + 1}`;
		},
		/**
		 * 获取去重后的单位名称列表（用于模板遍历）
		 * @param {String} type 单位类型：'host', 'co', 'support'
		 * @return {Array} 去重后的单位名称数组
		 */
		getUniqueOrganizerNames(type) {
			let fieldName = '';
			if (type === 'host') fieldName = 'organizer_host';
			else if (type === 'co') fieldName = 'organizer_co';
			else if (type === 'support') fieldName = 'organizer_support';
			
			if (!this.form[fieldName]) return [];
			return this.parseOrganizerNames(this.form[fieldName]);
		},
		/**
		 * 获取指定单位的Logo URL（只从zh数组中获取）
		 * @param {String} type 单位类型：'host', 'co', 'support'
		 * @param {Number} index 去重后的单位索引
		 * @return {String} Logo URL
		 */
		getOrganizerLogo(type, index) {
			// 确保结构完整
			if (!this.organizerLogos[type]) {
				this.organizerLogos[type] = { zh: [], eh: [] };
			}
			if (!this.organizerLogos[type].zh) {
				this.organizerLogos[type].zh = [];
			}
			
			// 获取去重后的单位名称
			const uniqueNames = this.getUniqueOrganizerNames(type);
			const targetName = uniqueNames[index];
			
			if (!targetName) return '/img/default.png';
			
			// 在zh数组中查找匹配的单位
			const logoItem = this.organizerLogos[type].zh.find(item => item.name === targetName);
			return logoItem ? logoItem.logo : '/img/default.png';
		},
		openLogoUpload(type, index) {
			this.uploadingOrganizerType = `${type}-${index}`;
			this.showOrganizerLogoUpload = true;
		},
		async uploadOrganizerLogo(param) {
			const formData = new FormData();
			formData.append('file', param.file);
			
			try {
				const json = await this.$post(this.url_upload, formData);
				if (json.result && json.result.url) {
					const [type, indexStr] = this.uploadingOrganizerType.split('-');
					const index = parseInt(indexStr);
					
					// 确保结构完整
					if (!this.organizerLogos[type]) {
						this.organizerLogos[type] = { zh: [], eh: [] };
					}
					if (!this.organizerLogos[type].zh) {
						this.organizerLogos[type].zh = [];
					}
					if (!this.organizerLogos[type].eh) {
						this.organizerLogos[type].eh = [];
					}
					
					// 获取去重后的单位名称（中文）
					const uniqueNames = this.getUniqueOrganizerNames(type);
					const targetName = uniqueNames[index];
					
					if (!targetName) {
						this.$message.error('无法找到单位名称');
						return;
					}
					
					// 获取单位名称字段
					let fieldName = '';
					if (type === 'host') fieldName = 'organizer_host';
					else if (type === 'co') fieldName = 'organizer_co';
					else if (type === 'support') fieldName = 'organizer_support';
					
					// 查找或创建zh数组中的条目
					let zhItem = this.organizerLogos[type].zh.find(item => item.name === targetName);
					if (zhItem) {
						// 更新现有条目
						zhItem.logo = json.result.url;
					} else {
						// 创建新条目
						zhItem = { name: targetName, logo: json.result.url };
						this.organizerLogos[type].zh.push(zhItem);
					}
					
					// 如果单位名称是双语的，也在eh数组中存储相同的logo路径
					if (this.form[fieldName]) {
						const originalNames = this.form[fieldName].split(',').map(s => s.trim()).filter(s => s);
						
						// 查找所有匹配的单位（包括中英文）
						for (const originalName of originalNames) {
							try {
								const parsed = JSON.parse(originalName);
								if (parsed && typeof parsed === 'object') {
									// 如果是JSON对象，检查中文是否匹配
									if (parsed.zh === targetName) {
										// 在eh数组中也存储相同的logo路径（使用英文名称）
										if (parsed.en) {
											let ehItem = this.organizerLogos[type].eh.find(item => item.name === parsed.en);
											if (ehItem) {
												// 更新现有条目
												ehItem.logo = json.result.url;
											} else {
												// 创建新条目
												ehItem = { name: parsed.en, logo: json.result.url };
												this.organizerLogos[type].eh.push(ehItem);
											}
										}
									}
								}
							} catch (e) {
								// 不是JSON格式，跳过
							}
						}
					}
					
					this.updateOrganizerLogosString();
					
					this.showOrganizerLogoUpload = false;
					this.$message.success('Logo上传成功');
				} else {
					this.$message.error('Logo上传失败');
				}
			} catch (error) {
				console.error('上传失败：', error);
				this.$message.error('Logo上传失败: ' + (error.message || '未知错误'));
			}
		},
		/**
		 * 格式化会议时间显示
		 * @param {String|Number} time 时间戳或时间字符串
		 * @return {String} 格式化后的时间字符串
		 */
		formatMeetingTime(time) {
			if (!time) return '';
			
			// 如果已经是格式化的字符串，直接返回
			if (typeof time === 'string' && /^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}$/.test(time)) {
				return time;
			}
			
			// 尝试使用 $toTime 格式化
			try {
				var formatted = this.$toTime(time, 'yyyy-MM-dd hh:mm:ss');
				if (formatted && formatted !== 'NaN-aN-aN aN:aN:aN') {
					return formatted;
				}
			} catch (e) {
				console.error('时间格式化失败:', e);
			}
			
			// 如果 $toTime 失败，尝试手动格式化
			try {
				var date;
				if (typeof time === 'string') {
					// 处理包含T的时间字符串
					var timeStr = time.replace('T', ' ').replace('Z', '').replace(/-/g, '/');
					date = new Date(timeStr);
				} else if (typeof time === 'number') {
					date = new Date(time);
				} else {
					date = new Date(time);
				}
				
				if (date && !isNaN(date.getTime())) {
					var year = date.getFullYear();
					var month = String(date.getMonth() + 1).padStart(2, '0');
					var day = String(date.getDate()).padStart(2, '0');
					var hours = String(date.getHours()).padStart(2, '0');
					var minutes = String(date.getMinutes()).padStart(2, '0');
					var seconds = String(date.getSeconds()).padStart(2, '0');
					return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
				}
			} catch (e) {
				console.error('手动时间格式化失败:', e);
			}
			
			return time; // 如果都失败，返回原始值
		},
		removeOrganizerLogo(type, index) {
			// 确保结构完整
			if (!this.organizerLogos[type]) {
				this.organizerLogos[type] = { zh: [], eh: [] };
			}
			if (!this.organizerLogos[type].zh) {
				this.organizerLogos[type].zh = [];
			}
			if (!this.organizerLogos[type].eh) {
				this.organizerLogos[type].eh = [];
			}
			
			// 获取去重后的单位名称（中文）
			const uniqueNames = this.getUniqueOrganizerNames(type);
			const targetName = uniqueNames[index];
			
			if (!targetName) {
				this.$message.error('无法找到单位名称');
				return;
			}
			
			// 从zh数组中删除或重置
			const zhIndex = this.organizerLogos[type].zh.findIndex(item => item.name === targetName);
			if (zhIndex !== -1) {
				this.organizerLogos[type].zh[zhIndex].logo = '/img/default.png';
			}
			
			// 获取单位名称字段
			let fieldName = '';
			if (type === 'host') fieldName = 'organizer_host';
			else if (type === 'co') fieldName = 'organizer_co';
			else if (type === 'support') fieldName = 'organizer_support';
			
			// 如果单位名称是双语的，也在eh数组中重置为默认图片
			if (this.form[fieldName]) {
				const originalNames = this.form[fieldName].split(',').map(s => s.trim()).filter(s => s);
				
				// 查找所有匹配的单位（包括中英文）
				for (const originalName of originalNames) {
					try {
						const parsed = JSON.parse(originalName);
						if (parsed && typeof parsed === 'object') {
							// 如果是JSON对象，检查中文是否匹配
							if (parsed.zh === targetName && parsed.en) {
								// 在eh数组中也重置为默认图片
								const ehIndex = this.organizerLogos[type].eh.findIndex(item => item.name === parsed.en);
								if (ehIndex !== -1) {
									this.organizerLogos[type].eh[ehIndex].logo = '/img/default.png';
								}
							}
						}
					} catch (e) {
						// 不是JSON格式，跳过
					}
				}
			}
			
			this.updateOrganizerLogosString();
			this.$message.success('Logo已重置为默认图片');
		},
	
	
			
	
		
			/**
			 * 获取对象之前
			 * @param {Object} param
			 */
			get_obj_before(param) {
				var form = "";
																																																			
				if(this.form && form){
					Object.keys(this.form).forEach(key => {
						Object.keys(form).forEach(dbKey => {
							// if(dbKey === "charging_standard"){
							// 	this.form['charging_rules'] = form[dbKey];
							// 	this.disabledObj['charging_rules_isDisabled'] = true;
							// };
							if(key === dbKey){
								this.disabledObj[key+'_isDisabled'] = true;
							}
						})
					})
				}
																						$.db.del("form");
				return param;
			},

		/**
		 * 获取对象之后
		 * @param {Object} json
		 * @param {Object} func
		 */
		get_obj_after(json, func){
			// 解析住宿图片JSON
			if (this.form.accommodation_images) {
				this.parseAccommodationImagesFromString(this.form.accommodation_images);
			}
			// 解析主办单位Logos JSON
			if (this.form.organizer_logos) {
				this.parseOrganizerLogosFromString(this.form.organizer_logos);
			}
		},

		/**
		 * 提交前处理
		 * @param {Object} param 请求参数
		 */
		submit_before(param) {
			// 确保住宿图片JSON字符串是最新的
			if (this.accommodationImagesList && this.accommodationImagesList.length > 0) {
				this.updateAccommodationImagesString();
			}
			
			// 同步eh数组（确保中英文都存储了相同的logo路径）
			if (this.form.organizer_host) {
				this.syncOrganizerLogosEh('host', this.form.organizer_host);
			}
			if (this.form.organizer_co) {
				this.syncOrganizerLogosEh('co', this.form.organizer_co);
			}
			if (this.form.organizer_support) {
				this.syncOrganizerLogosEh('support', this.form.organizer_support);
			}
			
			// 确保主办单位Logos JSON字符串是最新的
			this.updateOrganizerLogosString();
			
			// 处理会议时间：将时间戳转换为字符串格式（yyyy-MM-dd HH:mm:ss）
			if (param.meeting_time) {
				if (typeof param.meeting_time === 'number' || (typeof param.meeting_time === 'string' && /^\d+$/.test(param.meeting_time))) {
					// 如果是时间戳（数字或数字字符串），转换为日期字符串
					const timestamp = typeof param.meeting_time === 'string' ? parseInt(param.meeting_time) : param.meeting_time;
					const date = new Date(timestamp);
					if (!isNaN(date.getTime())) {
						const year = date.getFullYear();
						const month = String(date.getMonth() + 1).padStart(2, '0');
						const day = String(date.getDate()).padStart(2, '0');
						const hours = String(date.getHours()).padStart(2, '0');
						const minutes = String(date.getMinutes()).padStart(2, '0');
						const seconds = String(date.getSeconds()).padStart(2, '0');
						param.meeting_time = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
					}
				}
			}
			
			console.log('=== 提交前数据 ===');
			console.log('住宿图片列表:', this.accommodationImagesList);
			console.log('住宿图片JSON:', this.form.accommodation_images);
			console.log('主办单位Logos:', this.organizerLogos);
			console.log('主办单位Logos JSON:', this.form.organizer_logos);
			console.log('会议时间:', param.meeting_time);
			console.log('提交参数:', param);
			return param;
		},

		/**
		 * 提交前验证事件
		 * @param {Object} 请求参数
		 * @return {String} 验证成功返回null, 失败返回错误提示
		 */
		submit_check(param) {
			let msg = null
																																return msg;
		},

			is_view(){
				var bl = this.user_group == "管理员";

				if(!bl){
					bl = this.$check_action('/meeting_information/table','add');
					console.log(bl ? "你有表格添加权限视作有添加权限" : "你没有表格添加权限");
				}
				if(!bl){
					bl = this.$check_action('/meeting_information/table','set');
					console.log(bl ? "你有表格添加权限视作有修改权限" : "你没有表格修改权限");
				}
				if(!bl){
					bl = this.$check_action('/meeting_information/view','add');
					console.log(bl ? "你有视图添加权限视作有添加权限" : "你没有视图添加权限");
				}
				if(!bl){
					bl = this.$check_action('/meeting_information/view','set');
					console.log(bl ? "你有视图修改权限视作有修改权限" : "你没有视图修改权限");
				}
				if(!bl){
					bl = this.$check_action('/meeting_information/view','get');
					console.log(bl ? "你有视图查询权限视作有查询权限" : "你没有视图查询权限");
				}

				console.log(bl ? "具有当前页面的查看权，请注意这不代表你有字段的查看权" : "无权查看当前页，请注意即便有字段查询权限没有页面查询权限也不行");

				return bl;
			},
			/**
			 * 上传文件
			 * @param {Object} param
			 */
			uploadimg(param) {
				this.uploadFile(param.file, "avatar");
			},

		},
		watch: {
			'form.organizer_host'(newVal) {
				// 当主办单位名称变化时，同步更新Logo数据结构
				if (newVal) {
					// 确保结构完整
					if (!this.organizerLogos.host) {
						this.organizerLogos.host = { zh: [], eh: [] };
					}
					// 解析单位名称，去重（同一单位的中英文只算一个）
					const parsedNames = this.parseOrganizerNames(newVal);
					// 确保zh数组中有对应的条目
					for (let i = 0; i < parsedNames.length; i++) {
						const name = parsedNames[i];
						const existing = this.organizerLogos.host.zh.find(item => item.name === name);
						if (!existing) {
							this.organizerLogos.host.zh.push({ name: name, logo: '/img/default.png' });
						}
					}
					// 同步eh数组（如果单位名称是双语的）
					this.syncOrganizerLogosEh('host', newVal);
					this.updateOrganizerLogosString();
				}
			},
			'form.organizer_co'(newVal) {
				if (newVal) {
					if (!this.organizerLogos.co) {
						this.organizerLogos.co = { zh: [], eh: [] };
					}
					const parsedNames = this.parseOrganizerNames(newVal);
					for (let i = 0; i < parsedNames.length; i++) {
						const name = parsedNames[i];
						const existing = this.organizerLogos.co.zh.find(item => item.name === name);
						if (!existing) {
							this.organizerLogos.co.zh.push({ name: name, logo: '/img/default.png' });
						}
					}
					this.syncOrganizerLogosEh('co', newVal);
					this.updateOrganizerLogosString();
				}
			},
			'form.organizer_support'(newVal) {
				if (newVal) {
					if (!this.organizerLogos.support) {
						this.organizerLogos.support = { zh: [], eh: [] };
					}
					const parsedNames = this.parseOrganizerNames(newVal);
					for (let i = 0; i < parsedNames.length; i++) {
						const name = parsedNames[i];
						const existing = this.organizerLogos.support.zh.find(item => item.name === name);
						if (!existing) {
							this.organizerLogos.support.zh.push({ name: name, logo: '/img/default.png' });
						}
					}
					this.syncOrganizerLogosEh('support', newVal);
					this.updateOrganizerLogosString();
				}
			}
		},
		created() {
																				},
	}
</script>

<style>
	.avatar-uploader .el-upload {
		border: 1px dashed #d9d9d9;
		border-radius: 6px;
		cursor: pointer;
		position: relative;
		overflow: hidden;
	}

	.avatar-uploader .el-upload:hover {
		border-color: #409EFF;
	}

	.avatar-uploader-icon {
		font-size: 28px;
		color: #8c939d;
		width: 178px;
		height: 178px;
		line-height: 178px;
		text-align: center;
	}

	.avatar {
		width: 178px;
		height: 178px;
		display: block;
	}

	/* 住宿图片管理样式 */
	.accommodation_images_list {
		display: flex;
		flex-direction: column;
		gap: 15px;
		margin-bottom: 15px;
	}

	.image_item {
		display: flex;
		align-items: center;
		gap: 15px;
		padding: 15px;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		background: #f9f9f9;
	}

	.image_preview {
		flex-shrink: 0;
	}

	.image_info {
		flex: 1;
	}

	.image-uploader {
		text-align: center;
	}

	.image-uploader .el-upload {
		border: 1px dashed #d9d9d9;
		border-radius: 6px;
		cursor: pointer;
		position: relative;
		overflow: hidden;
	}

	.image-uploader .el-upload:hover {
		border-color: #409EFF;
	}

	/* 主办单位Logo管理样式 */
	.logo_section {
		margin-bottom: 25px;
		padding: 15px;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		background: #fafafa;
	}

	.logo_section_title {
		margin: 0 0 15px 0;
		padding: 8px 15px;
		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
		color: white;
		border-radius: 6px;
		font-size: 16px;
		font-weight: 600;
	}

	.logo_items {
		display: flex;
		flex-wrap: wrap;
		gap: 20px;
	}

	.logo_item {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 10px;
		padding: 15px;
		background: white;
		border: 2px solid #e0e0e0;
		border-radius: 8px;
		min-width: 200px;
	}

	.logo_preview {
		width: 150px;
		height: 150px;
		display: flex;
		align-items: center;
		justify-content: center;
		border: 1px solid #ddd;
		border-radius: 6px;
		overflow: hidden;
		background: #fff;
		padding: 10px;
	}

	.logo_preview img {
		max-width: 100%;
		max-height: 100%;
		object-fit: contain;
	}

	.logo_name {
		font-weight: 600;
		color: #333;
		text-align: center;
		min-height: 40px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.logo-uploader {
		text-align: center;
	}

	.logo-uploader .el-upload {
		border: 1px dashed #d9d9d9;
		border-radius: 6px;
		cursor: pointer;
		position: relative;
		overflow: hidden;
	}

	.logo-uploader .el-upload:hover {
		border-color: #409EFF;
	}

</style>
